package io.renren.modules.practice.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.practice.entity.UserCodeSaveEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserCodeSaveDao extends BaseMapper<UserCodeSaveEntity> {

    /**
     * 根据用户ID和题目ID查询保存的代码
     */
    List<UserCodeSaveEntity> selectByUserIdAndQuizId(@Param("userId") Integer userId, @Param("quizId") Integer quizId);

    /**
     * 根据用户ID查询保存的代码
     */
    List<UserCodeSaveEntity> selectByUserId(@Param("userId") Integer userId);
} 